package org.jsshbroadcast.thread;

import org.jsshbroadcast.ui.IUsuario;

/**
 *
 * @author Eduardo Folly
 */
public class VerificaThread implements Runnable {

    private IUsuario iu;
    private int maximo;

    public VerificaThread(IUsuario ret, int max) {
        iu = ret;
        maximo = max;
    }

    public void run() {
        while (iu.getProgressoAtual() != this.maximo) {
            try {
                java.lang.Thread.sleep(500);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        }
        iu.FinalizaProgresso();
    }
}
